package com.dick.base.parameter;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

@Data
public class TurnoverParameter {

    @NotEmpty(message = "列表不能为空")
    private List<TurnoverItem> items = new ArrayList<>();

    @Data
    public static class TurnoverItem {
        /**
         * 订单项id
         */
        @NotNull(message = "订单项id不能为空")
        private Long id;
        @Min(value = 0, message = "已生产数量不能为空")
        private Integer producedQuantity = 0;
    }
}
